﻿<Canvas x:Class="TouchExplorer.Controls.ClipboardFooter"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:touch="clr-namespace:TouchControls;assembly=TouchControls"
        xmlns:Controls="clr-namespace:TouchExplorer.Controls" mc:Ignorable="d" 
      Visibility="{Binding HasElements, Converter={StaticResource BoolToVisibilityConverter}}"  
             d:DesignHeight="300" d:DesignWidth="300">
    <Canvas.Resources>
        <Storyboard x:Key="ExpandStb">
            <DoubleAnimation Duration="0:0:0.3" Storyboard.TargetName="TranslateFooter" Storyboard.TargetProperty="Y" To="{Binding Height, ElementName=Content}">
                <DoubleAnimation.EasingFunction>
                    <QuadraticEase />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
        <Storyboard x:Key="CollapseStb">
            <DoubleAnimation Duration="0:0:0.3" Storyboard.TargetName="TranslateFooter" Storyboard.TargetProperty="Y" To="0">
                <DoubleAnimation.EasingFunction>
                    <QuadraticEase />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
    </Canvas.Resources>
    <Canvas.RenderTransform>
        <TranslateTransform x:Name="TranslateFooter" />
    </Canvas.RenderTransform>
    <Grid x:Name="Layout">
        <Grid.RowDefinitions>
            <RowDefinition Height="36" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid x:Name="Header" Background="#EE250931">
            <Grid Margin="4">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Image Source="{StaticResource ImgToolbarCopy}" Width="28" Stretch="Uniform" Visibility="{Binding IsInCopyMode, Converter={StaticResource BoolToVisibilityConverter}}" />
                <Image Source="{StaticResource ImgToolbarCut}" Width="28" Stretch="Uniform" Visibility="{Binding IsInCutMode, Converter={StaticResource BoolToVisibilityConverter}}" />
                <TextBlock Grid.Column="1" Text="{Binding Count}" Style="{StaticResource LargeWhiteText}" VerticalAlignment="Center" />
            </Grid>
        </Grid>
        <Grid x:Name="Content" MaxHeight="300" Grid.Row="1" Background="#DD250931"  >
            <Grid Margin="6">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <touch:TouchListBox x:Name="ClipboardList" ItemsSource="{Binding ClipboardElements}" HorizontalContentAlignment="Stretch">
                    <touch:TouchListBox.ItemTemplate>
                        <DataTemplate>
                            <Controls:ClipboardElementDisplay HorizontalAlignment="Stretch" />
                        </DataTemplate>
                    </touch:TouchListBox.ItemTemplate>
                </touch:TouchListBox>
                <WrapPanel Width="80" Grid.Column="1" Margin="8 0 0 0" >
                    <touch:Tile Content="Clear" Click="ClearClipboard" Width="64" Height="64" Icon="{StaticResource ImgToolbarRemove}" IconSize="32" />
                    <!--<touch:Tile Content="Paste" Click="ClipboardPaste"  Width="64" Height="64" Icon="{StaticResource ImgToolbarProcess}" />-->
                </WrapPanel>
            </Grid>
        </Grid>
    </Grid>
</Canvas>
